/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sims.execution;

import sims.entity.User;
import sims.io.AccountManager;

/**
 *
 * @author BinhMV
 */
public class UserManager {

    public String checkPass(String pass, String oldPass) {
        if (!pass.equals(oldPass)) {
            return "Password uncorrect !";
        } else {
            return null;
        }
    }

    public String changePass(String pass,User user) throws Exception {
        return new AccountManager().updatePass(pass, user);
    }
}
